When databases are distributed, synchronization needs to be performed so that each database applies the same modifications (or changes) that are made to each other database. Similarly, data stores may be synchronized with the modifications made to a database. In general, for efficiency synchronization is incremental from a previous synchronization point, also referred to as an anchor, whereby only modifications to a database from that point forward need to be communicated to the other database that is being synchronized.
One way in which the anchor can be used is to maintain a counter that increases with each modification, and store that counter in conjunction with the modification, e.g., in a counter column in the modified row. A similar technique for establishing an anchor is to store a date/time stamp (e.g., datetime) in conjunction with each modification. Synchronization thus proceeds by communicating any changes since the last anchor forward, and then updating the anchor to the new counter value or datetime value for the next synchronization.
A problem with this technique is that modifications to databases are part of transactions. Counters or datetimes are allocated to individual rows in the order in which the rows are modified, not in the order in which the transaction's modifications are committed. For example, if a transaction T has not committed at the time of synchronization, referred to as a change enumeration, any counters or datetimes corresponding to modifications that are part of that transaction T will not be enumerated when looking for changes, as typically change enumeration will only query committed data. However, the database counter or current time used as the anchor will have advanced.
As a result, the set of counters or datetimes seen at the change enumeration snapshot may not be contiguous, but the system will assume changes are contiguous up to the current anchor, with the next synchronization starting from that anchor. When changes are not enumerated, the two databases having a synchronization relationship may end up in a non-convergence state.